/*
 * Copyright (c) 1994-2017, Joyoung Stock CO.LTD.
 * The FWJR Project.
 * All Rights Reserved.
 */

package com.jz.jd.rest.response;

import com.jz.jd.rest.code.BusinessCode;

public class BaseResponse<T> {
    public int code;
    public String message;
    public String error;
    public String url;
    public T data;

    public boolean isSuccessful() {
        return code == BusinessCode.SUCCESS;
    }

    @Override
    public String toString() {
        return "BaseResponse{" +
                "code=" + code +
                ", msg='" + message + '\'' +
                ", error='" + error + '\'' +
                ", data=" + data +
                '}';
    }
}
